<?php
session_start();
require_once 'database.php';

$school = $_SESSION['school'];

// 删除
try {
    $stmt = $pdo->prepare('DELETE FROM teachers WHERE school = ?');
    $stmt->execute([$school]);
} catch (PDOException $e) {
    die('删除失败: ' . $e->getMessage());
}

// 重定向回用户管理页面
header('Location: teachers.php');
exit;
?>